<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="target-densitydpi=device-dpi, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="../../../../public/css/general.css">
    <link rel="stylesheet" href="../../../../public/css/mint-ui/lib/style.css">
    <link rel="stylesheet" href="../../../../public/css/iconfont/iconfont.css">
    <link rel="stylesheet" href="../../../../public/css/wechat/mine.css">
    <title>白蔬贞</title>
</head>
<body>
<div id="new-store">
    <div class="top-bar">
        <a href="javascript:;" @click="goBack()">
            <i class="iconfont">&#xe665;</i>
        </a>
        <span v-text="tip">新增门店</span>
    </div>
    <div class="placeholder"></div>
    <!--新增门店form-->
    <!--<div class="new-form form" v-if="flag=='new'">
        <div class="cell">
            <div class="item">
                <div class="title">
                    收货人：
                </div>
                <div class="content">
                    <input type="text" v-model="store.personName">
                </div>
            </div>
            <div class="item">
                <div class="title">
                    联系方式：
                </div>
                <div class="content">
                    <input type="tel" v-model="store.phone">
                </div>
            </div>
        </div>
        <div class="cell">
            <div class="item">
                <div class="title">所在地区：</div>
                <div class="content" v-text="store.region"></div>
                <div class="fotter">
                    <img class="right" src="../../../../public/images/right.png" alt="">
                </div>
            </div>
            <div class="item">
                <div class="title">详细地址：</div>
                <div class="content">
                    <input type="text" v-model="store.location">
                </div>
            </div>
            <div class="item">
                <div class="title">门店名称：</div>
                <div class="content">
                    <input type="text" v-model="store.name">
                </div>
            </div>
            <div class="item">
                <div class="title">营业时间：</div>
                <div class="content">
                    <input type="text" v-model="store.business">
                </div>
            </div>
        </div>
        <div class="cell">
            <div class="item">
                <div class="title">设置为默认下单地址：</div>
                <div class="label">注：每次下单时，默认使用该地址</div>
                <div class="fotter" @click="setDefault()">
                    <img class="radio" v-if="!store.isDefault" src="../../../../public/images/radio-unselected.png" alt="">
                    <img class="radio" v-if="store.isDefault" src="../../../../public/images/radio-selected.png" alt="">
                </div>
            </div>
        </div>
        <div class="button">
            <img @click="save()" src="../../../../public/images/save.png" alt="保存">
        </div>
    </div>-->

    <!--编辑门店form-->
    <div class="edit-form form">
        <div class="cell">
            <div class="item">
                <div class="title">
                    收货人：
                </div>
                <div class="content">
                    <input type="text" v-model="store.personName">
                </div>
            </div>
            <div class="item">
                <div class="title">
                    联系方式：
                </div>
                <div class="content">
                    <input type="tel" v-model="store.phone">
                </div>
            </div>
        </div>
        <div class="cell">
            <div class="item">
                <div class="title">所在地区：</div>
                <div class="content region">
                    <span v-text="store.province"></span>
                    <span v-text="store.city"></span>
                    <span v-text="store.district"></span>
                </div>
                <div class="fotter" @click="toShowRegion()">
                    <img class="right" src="../../../../public/images/right.png" alt="">
                </div>
            </div>
            <div class="item">
                <div class="title">详细地址：</div>
                <div class="content">
                    <input type="text" v-model="store.location">
                </div>
            </div>
            <div class="item">
                <div class="title">门店名称：</div>
                <div class="content">
                    <input type="text" v-model="store.name">
                </div>
            </div>
            <div class="item">
                <div class="title">营业时间：</div>
                <div @click="toShowTime()" class="content" v-text="store.business" style="text-align: center;"></div>
            </div>
        </div>
        <div class="cell">
            <div class="item">
                <div class="title">设置为默认下单地址：</div>
                <div class="label">注：每次下单时，默认使用该地址</div>
                <div class="fotter" @click="setDefault()">
                    <img class="radio" v-if="!store.isDefault" src="../../../../public/images/radio-unselected.png" alt="">
                    <img class="radio" v-if="store.isDefault" src="../../../../public/images/radio-selected.png" alt="">
                </div>
            </div>
        </div>
        <div class="button">
            <img @click="save()" v-if="flag!='edit-order'" src="../../../../public/images/save.png" alt="保存">
            <img @click="save()" v-if="flag=='edit-order'" src="../../../../public/images/save-use.png" alt="保存并使用">
        </div>
    </div>
    <!--地址选择器-->
    <div class="bsz-picker region-picker" v-show="picker=='region'">
        <div class="bar">
            <div class="cancel" @click="clearPicker()">取消</div>
            <div class="confirm" @click="selectRegion()">确定</div>
        </div>
        <mt-picker :slots="addressSlots" @change="onAddressChange"></mt-picker>
    </div>
    <!--时间选择器-->
    <div class="bsz-picker" v-show="picker=='time'">
        <div class="bar">
            <div class="cancel" @click="clearPicker()">取消</div>
            <div class="confirm" @click="selectBusiness()">确定</div>
        </div>
        <mt-picker :slots="businessSlots" @change="onBusinessChange"></mt-picker>
    </div>
</div>
<script src="../../../../public/js/vue.js"></script>
<script src="../../../../public/css/mint-ui/lib/index.js"></script>
<script src="../../../../public/js/store.js"></script>
<script src="../../../../public/js/picker.js"></script>
<script src="../../../../public/js/wechat/mine/store.js"></script>
</body>
</html>